﻿using System;
using System.Configuration;

namespace OdsServer.Common
{
    public class OdsServerPipeConfiguration : ConfigurationElementCollection
    {
        [ConfigurationProperty("active",
            DefaultValue = false,
            IsRequired = true,
            IsKey = false)]
        public bool Active
        {
            get { return (bool)this["active"]; }
            set { this["active"] = value; }
        }

        [ConfigurationProperty("inPipeName",
            DefaultValue = "ODS_SERVER_COMMAND",
            IsRequired = true,
            IsKey = false)]
        public string InPipeName
        {
            get { return (string)this["inPipeName"]; }
        }

        [ConfigurationProperty("outPipeName",
            DefaultValue = "ODS_SERVER_CHANNEL",
            IsRequired = true,
            IsKey = false)]
        public string OutPipeName
        {
            get { return (string)this["outPipeName"]; }
        }

        protected override ConfigurationElement CreateNewElement()
        {
            throw new NotImplementedException();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            throw new NotImplementedException();
        }
    }
}
